	
	package Dao;
	
	import java.util.List;
	import enitys.User;
	
	public interface UserDao {
		
		
		
	
		/**
		 * 用户登录验证
		 * @param user
		 * @return flag
		 * @throws Exception
		 */
		public boolean CheckLogin(String name,String password,int shenfen) throws Exception;
	
		
		
		
		
		/**
		 * 用户注册信息
		 * @param user,name
		 * @return flag
		 * @throws Exception
		 */
		
		public boolean userRegister(User user) throws Exception;
		
		
		
	
		/**
		 * 
		 * 查询学生信息
		 * @param user
		 * @return list 
		 * @throws Exception
		 */
		public List<User> findUser() throws Exception;
		
		
		
		
		/**
		 * 按id来查询学生信息
		 * @param s_id;
		 * @return user;
		 * @throws Exceptoon;
		 */
		public User getuserById(int s_id) throws Exception;
		
		
		/**
		 * 按姓名来查询学生信息
		 * @param name
		 * @return user
		 * @throws Exception
		 */
		
		public User findUserByName(String name)throws Exception;
		
		
		
		/**
		 * 修改学生信息
		 * @param user
		 * @return result 
		 * @throws Exception
		 */
		public boolean modfiyUser(User user,int id) throws Exception;
		
		
		
	
		/**
		 * 删除学生信息
		 * @param user
		 * @return result
		 * @throws Exception
		 */
		public int deleteUser(int  id) throws Exception;

	}
